import { Link, useNavigate } from 'react-router-dom';

const Login = () => {
  const navigate = useNavigate();
  return (
    <div>
      我是登录页
      <Link to='/article'>跳转到文章页</Link>
      <button onClick={() => navigate('/article?id=001&name=jack')}>searchParams传参</button>
      <button onClick={() => navigate('/article/002/jack')}>params传参</button>
    </div>
  );
};

export default Login;
